FROM {{.registry}}/{{.upstream}}

RUN groupadd -g 1000 git && \
    useradd -d /data -u 1000 -g 1000 git

RUN apt-get update && \
    apt-get install -y gosu git && \
    rm -rf /var/lib/apt/lists/*

ADD minit.d /etc/minit.d

RUN curl -sSL -o /opt/bin/gitea '{{.gitea_download_url}}' && \
    chmod +x /opt/bin/gitea

WORKDIR /data